 <div class="page-content" >
            
    <div class="panel panel-default">
			 <div class="panel-heading">
         <ul class="breadcrumb"> 
				<li><a href="<{:U('School/student')}>">学生管理</a> </li>
				<li class="active">添加/修改学生</li>
			</ul>
			</div>
        <div class="panel-body">
            <form id="form" class="form-horizontal" enctype="multipart/form-data" action="<{:U('School/add_student')}>" autocomplete="off" method="post" novalidate="novalidate">
                <input type="hidden" name="id" value="<{$data.id}>">
            <input type="hidden" name="user_id" value="<{$data.user_id}>">
            
                <div class="form-group">
                    <label class="col-sm-2 control-label">姓名</label>
                    <div class="col-sm-7">
                        <input type="text" name="name" class="form-control" value="<{$data.name}>">
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                 
                     
				     <div class="form-group">
                    <label class="col-sm-2 control-label">省份</label>
                    <div class="col-sm-7">
                         <select name="province_id" class="combox input-medium" target="sectionselect" refurl="<{:U('School/get_ajax_school_sel')}>?province_id={value}">
							<option value="">请选择省份</option>
							<volist name="province_list" id="vo">
							<option <if condition="$vo['id'] eq $data['province_id']">selected="selected"</if> value="<{$vo.id}>"><{$vo.name}></option>
							</volist>
						</select>
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                 
				     <div class="form-group">
                    <label class="col-sm-2 control-label">学校</label>
                    <div class="col-sm-7">
                          <select name="school_id" id="sectionselect" class="input-medium" target="school_select">
							<option value="">请选择学校</option>
							<volist name="schools_list" id="vo">
							<option <if condition="$vo['id'] eq $data['school_id']">selected="selected"</if> value="<{$vo.id}>"><{$vo.name}></option>
							</volist>
							</select>
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                 
				 
				  <!--<div class="form-group">
                    <label class="col-sm-2 control-label">班级</label>
                    <div class="col-sm-7">
                         <select name="class_id" id="school_select">
							<option value="">班级</option>
							<volist name="classrooms_list" id="vo">
							<option <if condition="$vo['id'] eq $data['class_id']">selected="selected"</if> value="<{$vo.id}>"><{$vo.name}></option>
							</volist>
							</select>
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>-->
                 
                 <div class="form-group">
                    <label class="col-sm-2 control-label">性别</label>
                    <div class="col-sm-7">
                        <label class="btn btn-default">
                            <input type="radio" name="gender" <if condition="$data['gender'] eq 1">checked="checked" </if> value="1">
                            男
                        </label>
                        <label class="btn btn-default">
                            <input type="radio" <if condition="$data['gender'] eq 2">checked="checked"</if>  name="gender"  value="2">
                            女
                        </label>
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">手机</label>
                    <div class="col-sm-7">
                        <input type="text" name="phone" class="form-control" value="<{$data.phone}>">
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">QQ</label>
                    <div class="col-sm-7">
                        <input type="text" name="qq" class="form-control" value="<{$data.qq}>">
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">微信</label>
                    <div class="col-sm-7">
                        <input type="text" name="wechat_id" class="form-control" value="<{$data.wechat_id}>">
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">邮箱</label>
                    <div class="col-sm-7">
                        <input type="text" name="email" class="form-control" value="<{$data.email}>">
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>

                  <div class="form-group">
                    <label class="col-sm-2 control-label">学号</label>
                    <div class="col-sm-7">
                        <input type="text" name="studentid" class="form-control" value="<{$data.studentid}>">
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">院系</label>
                    <div class="col-sm-7">
                        <input type="text" name="department_name" class="form-control" value="<{$data.department_name}>">
                    </div>
                    <div class="col-sm-3">
                    </div>
                    <div class="">

                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">专业</label>
                    <div class="col-sm-7">
                        <input type="text" name="major_name" class="form-control" value="<{$data.major_name}>">
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">入学时间</label>
                    <div class="col-sm-7">
                        <input type="text" name="enrollment_dt" data-date="<{$data['enrollment_dt']?$data['enrollment_dt']:date('Y-m-d')}>" data-date-format="yyyy-mm-dd" class="form-control input-small datetimepicker" value="<{$data.enrollment_dt}>">
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">宿舍地址</label>
                    <div class="col-sm-7">
                        <input type="text" name="dorm" class="form-control" value="<{$data.dorm}>">
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">年龄</label>
                    <div class="col-sm-7">
                        <input type="number" name="age" maxlength="2" class="form-control" value="<{$data.age}>">
                    </div>
                    <div class="col-sm-3">
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-7">
                        <button type="submit" class="btn btn-primary">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
   

        </div>
<script>
 
$(function(){
    $(".form-horizontal").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
		 real_name: {
                message: '姓名',
                validators: {
                    notEmpty: {
                        message: '姓名不能为空'
                    },
                }
            },
            school_id: {
                message: '学校名称',
                validators: {
                    notEmpty: {
                        message: '学校名称不能为空'
                    },
                }
            },
		 
			/* class_id: {
                message: '班级',
                validators: {
                    notEmpty: {
                        message: '请选择班级'
                    },
                }
            },*/
			mobile: {
                message: '手机',
                validators: {
                   regexp: {
                        regexp: /^(0?1\d{10})$/,
                        message: '请输入正确手机：11位手机号'
                    }
                }
            },
			qq: {
                message: 'qq',
                validators: {
                   integer: {
                        message: '请输入正确qq号'
                    }
                }
            },
			email: {
                message: '邮箱',
                validators: {
                   emailAddress: {
                        message: '请输入正确邮箱'
                    }
                }
            },
			/*enrollment_dt: {
                message: '入学时间',
                validators: {
                   date: {
                        message: '请输入正确的时间'
                    }
                }
            },*/
			age: {
                message: '年龄',
                validators: {
                   integer: {
                        message: '请输入正确年龄'
                    }
                }
            },
			gender: {
                message: '性别',
                validators: {
                   notEmpty: {
                        message: '请选择性别'
                    }
                }
            },
			
			  

        }
    });
	
 
});
 </script>



 